package com.sctvcloud.bazhong.beans;


import java.util.ArrayList;
import java.util.List;

public class RssFeed {

    private String title;

    private Image image;

    private String description;

    private String link;

    private String pubDate;

    private List<RssItem> list;


    private int itemCount; // 用于计算列表的数目

    public RssFeed(){
        list = new ArrayList<RssItem>();
    }
    // 添加RssItem条目,返回列表长度
    public int addItem(RssItem rssItem) {
        list.add(rssItem);
        itemCount++;
        return itemCount;
    }

    // 根据下标获取RssItem
    public RssItem getItem(int position) {
        return list.get(position);
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Image getImage() {
        return image;
    }

    public void setImage(Image image) {
        this.image = image;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }


    public String getPubDate() {
        return pubDate;
    }

    public void setPubDate(String pubDate) {
        this.pubDate = pubDate;
    }

    public List<RssItem> getList() {
        return list;
    }

    public void setList(List<RssItem> list) {
        this.list = list;
    }

    public int getItemCount() {
        return itemCount;
    }

    public void setItemCount(int itemCount) {
        this.itemCount = itemCount;
    }
}
